1. Field of the Invention
This invention relates to an apparatus for controlling an electric motor for opening and closing an elevator door by a microcomputer.
2. Description of the Related Art
FIG. 5 shows a conventional elevator door controller disclosed in Japanese Patent Laid-Open No. 1-92191. As shown in FIG. 5, a power circuit 2 is connected to a power source 1, and an electric motor 3 for driving a door is connected to the power circuit 2. An encoder 4 produces pulses proportional in number to the angle of rotation of the electric motor 3. A one-chip microcomputer 7 has a CPU 7A, a ROM 7B, a RAM 7C, a pulse count unit 7D for counting input pulses, an input/output port 7E, an A/D converter 7F, and a pulse width modulation (PWM) unit 7G for generating a pulse width modulated (PWM) signal. The encoder 4 is connected to the pulse count unit 7D. To the input/output port 7E are connected an elevator control panel 5 which outputs a door opening command signal 5a or a door closing command signal 5b, and a position switch 6 which outputs a fully opened position signal 6a or a fully closed position signal 6b which indicates that the door is in a fully opened position or a fully closed position.
A control power source 8 for supplying the control circuit with electric power from the power source 1 is connected to the power source 1. A 5 V monitor circuit 9 is connected to the control circuit 8. The 5 V monitor circuit 9 detects a rise or a fall of 5 V power for the microcomputer 7 and supplies a reset pulse to a reset terminal of the microcomputer 7. A gate signal generator circuit 10 is connected to the PWM unit 7G and the 5 V monitor 9 of the microcomputer 7.
As shown in FIG. 6, the power source 1 has a converter 1B which is connected to a secondary coil 1A of a transformer and which is formed of diodes 1a to 1d constituting a rectifier circuit and a smoothing capacitor 1e.
An AC voltage output from the secondary coil 1A of the transformer is rectified and smoothed by the converter 1B, and the rectified output is again converted into an AC voltage by the power circuit 2 to be output to the electric motor 3.
The encoder 4 generates pulses proportional in number to the angle of rotation of the electric motor 3 and supplies the pulses to the pulse count unit 7D.
The operation of the one-chip microcomputer 7 will now be described below with reference to FIG. 7. The program illustrated by this flow chart is stored in the ROM 7B.
First, in step 21, door opening command signal 5a or door closing command signal 5b from the control panel 5 is read. In step 22, a determination is made as to whether the door is to be opened or closed. If the door is to be opened, the process proceeds to step 23 and the value of data in the pulse count unit 7D is read. Next, in step 24, fully opened position signal 6a or fully closed position signal 6b is received from the position switch 6, and the position of the door is calculated from the pulse count unit 7D data value. In step 25, the speed Vt of the electric motor 3 is calculated from the above data value. In step 26, the speed command mode for acceleration, constant speed, or deceleration is discriminated according to the position of the door. Thereafter, in step 27, a speed command value Vp corresponding to the door position is read from the ROM 7B, and/in step 28, the deviation of the speed Vt from the speed command value Vp is calculated. Calculation for phase compensation is performed in step 29 and the above deviation is multiplied by a gain K in step 30. In step 31, the torque is limited according to the door position. The value thus calculated is supplied to the PWM unit 7G and PWM signal is output from the PWM unit 7G in step 32.
If it is determined in step 22 that the door is to be closed, the processing for closing the door is conducted basically in conformity with the above-described door opening processing.
The PWM signal is output to the gate signal generator circuit 10 and the gates of power transistors of the power circuit 2 are PWM-controlled, thereby enabling the speed of the electric motor, i.e., the speed of the door to be controlled with accuracy.
If the voltage of the control power source 8 drops due to a shutoff of the power source 1 or a momentary service interruption, the 5 V monitor circuit 9 generates a reset pulse, the one-chip microcomputer 7 is thereby stopped and the power circuit 2 is shut off.
In the above-described conventional elevator door controller, the one-chip microcomputer 7 is reset if the voltage of the control power source drops. If resetting takes place when the door is being opened or closed at the highest speed, the power circuit 2 is shut off and cannot apply any braking force to the electric motor, so the door moves by inertial force and continues opening or closing at a high speed, creating a dangerous situation.